﻿<!DOCTYPE HTML>
<html>
<head th:include="fragments/_header :: _head('文章列表')"></head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 项目管理 <span class="c-gray en">&gt;</span> 文章列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">

	<div class="cl pd-5 bg-1 bk-gray">
		<span class="l">
			<a href="javascript:;" onclick="add('添加','/article/add','700','500')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加</a>
		</span>
		<span class="r">共有数据：<strong th:text="${page.total}">0</strong> 条</span>
	</div>
	<div class="text-c mt-20">
		<form action="/article/list" id="searchForm">
			<input type="hidden" name="page" id="page" th:value="${page.current}">
		</form>
	</div>
	<div class="dataTables_wrapper no-footer  mt-20">
		<table class="table table-border table-bordered table-bg">
			<thead>
				<tr>
					<th scope="col" colspan="4">文章列表</th>
				</tr>
				<tr class="text-c">
					<th width="80">ID</th>
					<th width="180">标题</th>
					<th width="120">创建时间</th>
					<th width="100">操作</th>
				</tr>
			</thead>
			<tbody>
				<tr class="text-c"  th:each="article:${page.records}">
					<td th:text="${article.id}">admin</td>
					<td th:text="${article.title}">admin</td>
					<td  th:text="${#dates.format(article.createTime, 'yyyy-MM-dd HH:mm:ss')}">2014-6-11 11:11:42</td>
					<td class="td-manage">
						<a style="text-decoration:none" class="btn btn-primary radius" th:aid="${article.id}" href="javascript:;" onclick="edit('编辑','/article/add',this,'700','500')" title="编辑">编辑</a>
					</td>
				</tr>
			</tbody>
		</table>
		<div th:replace="fragments/_page :: pageBar(${page})"></div>
		<div th:replace="fragments/_page :: pagination(${page})"></div>
	</div>
</div>
<div th:include="fragments/_footer :: _footer"></div>
<script th:replace="fragments/_page :: pageScript"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript">

/*管理员-增加*/
function add(title,url,w,h){
	layer_show(title,url,w,h);
}

/*管理员-编辑*/
function edit(title,url,obj,w,h){
    var id = $(obj).attr("aid");
    layer_show(title, url + "?id=" + id, w, h);
}
</script>
</body>
</html>